package com.ujiuye.domain.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@ToString
@Data
public class Movie {
    private int id;
    private String name;
    private String director;
    private int time_length;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date pub_date;
    private String description;
    private float rating;
    private String pic;
    // 在电影与演员的编辑界面,选中的多个演员的id,比如: "1,3,4"
    private String actorIds;

    // 一个电影会有多个演员,一对多的关系
    private List<Actor> actors;
    // 一个电影有多个类型,一对多的关系
    // private String categories;
    private String categories; // '1,2'
    private List<Category> cateList;
}
